/**
 * @file queue_process_mdc.h
 *
 * Copyright (c) Huawei Technologies Co., Ltd. 2020-2021. All rights reserved.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#ifndef QUEUE_PROCESS_MDC_H
#define QUEUE_PROCESS_MDC_H

#include <map>
#include <string>
#include "queue_process.h"

namespace acl {
class QueueProcessorMdc : public QueueProcessor {
public:
    aclError acltdtCreateQueue(const acltdtQueueAttr *const attr, uint32_t *const qid) override;

    aclError acltdtDestroyQueue(const uint32_t qid) override;

    aclError acltdtGrantQueue(const uint32_t qid, const int32_t pid, const uint32_t permission,
        const int32_t timeout) override;

    aclError acltdtAttachQueue(const uint32_t qid, const int32_t timeout,
        uint32_t *const permission) override;

    aclError acltdtBindQueueRoutes(acltdtQueueRouteList *const qRouteList) override;

    aclError acltdtUnbindQueueRoutes(acltdtQueueRouteList *const qRouteList) override;

    aclError GrantQueue2Cp(const int32_t deviceId, const uint32_t qid) const;

    aclError acltdtQueryQueueRoutes(const acltdtQueueRouteQueryInfo *const queryInfo,
                                    acltdtQueueRouteList *const qRouteList) override;

    aclError acltdtAllocBuf(const size_t size, const uint32_t type, acltdtBuf *const buf) override;

    QueueProcessorMdc() = default;
    ~QueueProcessorMdc() override = default;

    // not allow copy constructor and assignment operators
    QueueProcessorMdc(const QueueProcessorMdc &) = delete;

    QueueProcessorMdc &operator=(const QueueProcessorMdc &) = delete;

    QueueProcessorMdc(QueueProcessorMdc &&) = delete;

    QueueProcessorMdc &&operator=(QueueProcessorMdc &&) = delete;
};
}
#endif // QUEUE_PROCESS_MDC_H
